﻿/**
*基础配置
*@module config
*@class Base_ParamConfig
*@static
*/
var Base_ParamConfig = {
    /**
    *默认使用样式
    *@property defaultTheme
    *@type {String}
    */
    defaultTheme: "default",
    /**
    *默认项目
    *@property defaultProject
    *@type {String}
    */
    defaultProject: "sddc",
    /**
    *默认登陆界面
    *@property defaultProject
    *@type {String}
    *value [yulonglogin.aspx,zhujiantingLogin.aspx,sdLogin.aspx,GALogin.aspx ]
    */  
    defaultLoginPage: "sddclogin.aspx"
};

/*针对不同的项目跳转到不同的登陆界面*/
(function (url, login) {
    if (login !== "" && login !== "login.aspx") {
        if (url.indexOf("/login.aspx") !== -1 && url.indexOf("/" + login) == -1) location.href = login;
    }
})(location.href.toLowerCase(), Base_ParamConfig.defaultLoginPage.toLowerCase());

/*加载必须脚本与样式文件*/
(function () {
    var scriptTags = [];
    var url = location.href;
    if (url.indexOf("home.aspx") == -1 && url.indexOf("onemap.html")==-1) {
        scriptTags.push("<link rel='stylesheet' type='text/css' href='library/bootstrap/bootstrap.min.css' />");
        scriptTags.push("<link rel='stylesheet' type='text/css' href='library/bootstrap/bootstrap-theme.min.css' />");
        scriptTags.push("<link rel='stylesheet' type='text/css' href='themes/" + Base_ParamConfig.defaultTheme + "/css/system.main.css' />");
        scriptTags.push("<link rel='stylesheet' type='text/css' href='themes/" + Base_ParamConfig.defaultTheme + "/css/gp.css' />");
        scriptTags.push('<link rel="stylesheet" type="text/css" href="library/zTree/css/zTreeStyle/zTreeStyle.css"/>');
        scriptTags.push("<script src='library/jquery/jquery-1.11.1.min.js'></script>");
        scriptTags.push("<script src='modules/analysis/swfupload/swfupload.js'></script>");
        scriptTags.push("<script src='modules/analysis/swfupload/swfupload.queue.js'></script>");
        scriptTags.push("<script src='modules/analysis/swfupload/fileprogress.js'></script>");
        scriptTags.push("<script src='modules/analysis/swfupload/filegroupprogress.js'></script>");
        scriptTags.push("<script src='modules/analysis/swfupload/handlers.js'></script>");
        scriptTags.push('<script src="library/zTree/js/jquery.ztree.all-3.5.min.js"></script>');
        scriptTags.push('<script src="library/zTree/js/jquery.ztree.exhide-3.5.min.js"></script>');
    }
    scriptTags.push("<script src='login_files/project.default.config.js'></script>");
    scriptTags.push("<script src='login_files/project.sddc.config2.js'></script>");
    for (var i = 0, len = scriptTags.length; i < len; i++) {
        document.write(scriptTags[i]);
    }
})();